package cal;

import com.alibaba.fastjson.JSONObject;

public class Truck {
    public double vehicleWeight;
    public double carryingCapacity;
    public double totalWeight;
    public double maxHeight;
    public double maxWidth;
    public double totalLength;
    public double gooseneck;
    public double maxSlope;
    public double turningCircle;
    public double currentSpeed;
    public double Front_suspension;   //前悬尺寸
    public double Rear_suspension;      //后悬尺寸
    public double wheel_base;  //轴距
    public double wheel_track;  //轮距
    public Truck() {
        vehicleWeight = 20;
        carryingCapacity = 78.8;
        totalWeight = 98.8;
        maxHeight = 3.5;
        maxWidth = 3.0;
        totalLength = 14;
        gooseneck = 3.65;
        maxSlope = 30;
        turningCircle = 15;
        currentSpeed = 80;
        Front_suspension=0.5;   //前悬尺寸
        Rear_suspension=0.5;      //后悬尺寸
        wheel_base=10;  //轴距
        wheel_track=3;  //轮距
    }

    /**
     * @return
     * @description
     * @params [truck]
     * @author lj
     * @date 2020/7/21 19:44
     */
    public Truck(JSONObject truck) {
        super();
        vehicleWeight = truck.getDouble("vehicleWeight");
        carryingCapacity = truck.getDouble("carryingCapacity");
        totalWeight = truck.getDouble("totalWeight");
        maxHeight = truck.getDouble("maxHeight");
        maxWidth = truck.getDouble("maxWidth");
        totalLength = truck.getDouble("totalLength");
        gooseneck = truck.getDouble("gooseneck");
        maxSlope = truck.getDouble("maxSlope");
        turningCircle = truck.getDouble("turningCircle");
        currentSpeed = truck.getDouble("currentSpeed");
    }
}
